<?php

$status=getLockVal();
if ($status=="LOCK")
	$in_progress=true;
else
	$in_progress=false;

$proxy_all=getVarBuffer('proxy_all');
$proxy_done=getVarBuffer('proxy_done');

$radius_all=getVarBuffer('radius_all');
$radius_done=getVarBuffer('radius_done');

$tacacs_all=getVarBuffer('tacacs_all');
$tacacs_done=getVarBuffer('tacacs_done');

$fail_all=getVarBuffer('fail_all');
$fail_done=getVarBuffer('fail_done');

$pass_all=getVarBuffer('pass_all');
$pass_done=getVarBuffer('pass_done');


if ($in_progress===true) {?>

	<b><font color="red">in progress</font></b>
	
	<table>
	<tr> 
		<td>Proxy:</td> 
		<td><?php echo $proxy_done."/".$proxy_all ;?></td> 
	</tr>
	<tr> 
		<td>Radius:</td> 
		<td><?php echo $radius_done."/".$radius_all ;?></td> 
	</tr>
	<tr> 
		<td>Tacacs+:</td> 
		<td><?php echo $tacacs_done."/".$tacacs_all ;?></td> 
	</tr>
	<tr> 
		<td>Failed attempts:</td> 
		<td><?php echo $fail_done."/".$fail_all ;?></td> 
	</tr>
	<tr> 
		<td>Passed Authentifications:</td> 
		<td><?php echo $pass_done."/".$pass_all ;?></td> 
	</tr>
	</table>

<?php 
} else{?>
	
	<b><font color="green">free to update</font></b>

<?php 
}
?>
